import React from "react";
const Home = React.lazy(() => import("../views/home"));
const Car = React.lazy(() => import("../views/car"));
const Layout = React.lazy(() => import("../views/layout"));
const Detail = React.lazy(() => import("../views/detail"));
const Product = React.lazy(() => import("../views/product"));

export const routes = [
  {
    path: "/",
    element: <Layout></Layout>,
    children: [
      {
        path: "/",
        element: <Home></Home>,
      },
      {
        path: "/car",
        element: <Car></Car>,
      },
    ],
  },
  {
    path: "/detail/:id",
    element: <Detail></Detail>,
  },
  {
    path: "/product",
    element: <Product></Product>,
  },
];
